<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/templates/manageui.xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
	<ui:define name="customCSS">
		<link type="text/css" rel="stylesheet"
			href="#{request.contextPath}/css/login.css" />
	</ui:define>

	<ui:define name="customStyle">
		<style type="text/css">
.ui-widget-header {
	display: none !important;
}

.errormessage {
	color: rgb(185, 74, 72);
	background-color: rgb(242, 222, 222);
	border-color: rgb(238, 211, 215);
	font-size: 12px !important;
	font-family: Arial, sans-serif;
}
</style>
	</ui:define>
	<ui:define name="content">





		<div class="container">
			<div id="content">
			<p:focus context="loginForm" />
				<p:dialog id="dialog" closable="false" resizable="false"
					modal="true" visible="true" width="400px" height="305px">
					<h:form id="loginForm" prependId="false">
						<h1>Login</h1>
						<div>
							<p:inputText value="#{loginBean.login}" id="username"
								required="true" requiredMessage="Please input your username." />
							<p:watermark for="username" value="Username" />
						</div>
						<div>
							<p:password value="#{loginBean.password}" id='password'
								redisplay="false" required="true"
								requiredMessage="Please input your password." />
							<p:watermark for="password" value="Password" />
						</div>
						<p:outputPanel id="jcaptchaPanel" autoUpdate="true" layout="block" rendered = "#{loginBean.showJcaptcha}">
							<h:commandButton immediate="true" image="jcaptcha.jpg"
								style="width: 50%; float: left; height: 40px;"
								action="#{loginBean.triggerImage}" id="jcaptchaImage">
							</h:commandButton>
							<p:inputText id="jcaptcha" required="true" name="jcaptcha"
								requiredMessage="Please input captchaCode." />
							<p:watermark for="jcaptcha" value="jcaptcha Code" />
						</p:outputPanel>
						<div>
							<h:commandButton type="submit" id="submit" value="Log in"
								action="#{loginBean.login}" />
							<a href="#" id="lost">Lost your password?</a> <a href="#{request.contextPath}/register.jsf"
								id="register">Register</a>
						</div>
					</h:form>
				</p:dialog>

			</div>
		</div>
	</ui:define>
</ui:composition>